ClockAdjust is a control panel for adjusting the Macintosh’s hardware clock. It serves two purposes:
• It keeps track of manual corrections of the clock (thus monitoring an adjustment factor) and adjusts the clock automatically when a certain time has elapsed.
• It allows to specify rules for switching to daylight saving time and back to regular time and automatically corrects the clock according to these rules.
All corrections are done whenever the Macintosh is rebooted (only if necessary, of course). This means that neither memory nor time is needed during normal operation.
Automatic Clock Correction
The Macintosh’s clock chip is not very accurate. I have observed deviations of one second within 15 hours (which accumulates to more than one minute in a month). One thing you can do in such a case is to correct the clock, say, every month. You would then realize that you would adjust the clock by the same time difference every month. When you have ClockAdjust installed, you correct the clock once and then forget about it. ClockAdjust will do the rest for you.
The upper portion of the ClockAdjust panel controls the clock correction parameters:
To set the clock, click on the time and use the up and down arrows in the same way as in the “General” Control Panel device. When the time is correct, click the Exact button. The Synch button lets you synchronize the clock with a time signal. It sets the clock to the closest minute and resets the seconds to 0. All these corrections are monitored and the resulting correction factor is displayed after “current adjustment”. In the example above, “1:207996” means that the clock was one second too slow within a period of 207996 seconds (57 hours, 46 minutes and 36 seconds). If the clock is too fast, a minus sign is displayed in from of the adjustment factor.
When you shut down your Mac and switch it on again when you return from your vacation after two weeks (336 hours), ClockAdjust will adjust the clock by approximately 6 seconds. If you watch your Mac during the startup process, you can even tell whether or not ClockAdjust had to make a correction. Usually ClockAdjust lines up in the icon parade with its usual icon. When an adjustment was made, a slightly different icon is shown. The hand appears to make a manual adjustment, and “+/–” is shown in the upper area of the clock:
The Reset button sets the current adjustment factor to “none”. When you install ClockAdjust, you should first set the clock with the Exact or Synch button and then press Reset. It is a good idea to correct the clock after 2 weeks and again after 2 months. Once ClockAdjust is installed, do not press the Reset button any more, since ClockAdjust would then forget all corrections made so far.
You will notice that the buttons look different than standard buttons. They are in fact different from the usual buttons in that they are “touch sensitive”, i.e. the appropriate action is executed when the mouse button is pressed over such a button and not when it is released. This behavior makes it easier to set the clock.
Daylight Saving Time
The lower portion of the ClockAdjust panel controls the dates when daylight saving time is switched on and off:
There are four pop-up menus for both “on” and “off”. The example above shows the rules used in Austria and Germany, and probably also in all other European countries. We switch to daylight saving time on the last Sunday in March (“<=” means the last Sunday on or before March 31) and back to regular time on the last Sunday in September.
The first two pop-up menus have additional items “exactly” and “on”, which are linked together. When you select “exactly” in the first menu, the second automatically jumps to “on” and vice versa. These items are (at least to my knowledge) only necessary for the (former) Soviet Union.
The relations have the following meaning:
< the last day before a specified date
<= the last day before or on a specified date
> the first day after a specified date
>= the first day after or on a specified date
Examples:
first Sunday in April: Sunday >= April 1
Sunday > March 31
Sunday <= April 7
Sunday < April 8
last Sunday in October: Sunday >= October 25
Sunday > October 24
Sunday <= October 31
Sunday < November 1
last Sunday in February: Sunday < March 1
Note that this is the only possibility to specify this rule, since we do not know how many days February will have.
There is no possibility to specify the exact hour of switching. 00:00 is always assumed.
The following table shows a couple of rules for various countries
US, Canada: on: Sunday >= April 1 (first Sunday in April)
off: Sunday <= October 31 (last Sunday in October)
China (PRC): on: Sunday > April 7 (second Sunday in April)
off: Sunday > September 7 (second Sunday in September)
Israel: on: Sunday > April 14 (third Sunday in April)
off: Saturday > August 21 (fourth Saturday in August)
Brazil: on: Saturday > October 21 (fourth Saturday in October)
off: Saturday > February 7 (second Saturday in February)
USSR: on: exactly on April 1 (April 1st)
off: exactly on October 1 (October 1st)
If your country doesn't use daylight saving time, simply set the on and the off date to the same day. The panel will then always display “currently off” and no switching will be performed.
Legal Stuff
• ClockAdjust is free of charge.
• ClockAdjust may be freely distributed, provided that this documentation is included.
• Uploading ClockAdjust to free bulletin boards is allowed (and encouraged).
• You must not charge for distribution of ClockAdjust.
• Bundling ClockAdjust with other products requires my explicit written consent.
• Use ClockAdjust at your own risk.
Version History
Version 1.0
• Worked, but not in all cases.
Version 1.1
• Corrected bug in the clock correction code.
• Added special case for handling countries without DST.
• Corrected delay when the “Exact” button was pressed.
Version 1.2
• Simplification of the correction code (should be more stable now)
• Icons for System 7
• Three-dimensional buttons in the control panel
• Adjustment made visible at startup
Author’s Address
Günther Blaschek
Petzoldstr. 31
A–4020 Linz
Austria (Europe)
e-Mail: <gue@soft.uni-linz.ac.at> or <Blaschek@ALIJKU11.BITNET>